class Node():
    def __init__(self, initdata):
        self.data = initdata
        self.next = None
    
    def getData(self):
        return self.data

    def getNext(self):
        return self.next
    
    def setData(self, newdata):
        self.data = newdata
    
    def setNext(self, newnext):
        self.next = newnext

# def add(self, item):
#     temp = Node(item)
#     temp.setNext(self.head)
#     self.head = temp

def remove(self, item):
    current = self.head
    previous = None
    found = False
    while not found:
        if current.getData() == item:
            found = True
        else:
            previous = current
            current = current.getNext()

    if previous == None:
        self.head = current.getNext()
    else:
        previous.setNext(current.getNext())

if __name__ == "__main__":
    temp = Node(98)
    print(temp.getData())
    temp.setData(19)
    print(temp.getData())